using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.VFX;

public class SyncVfxSizeWithScale:MonoBehaviour {

	VisualEffect vfx;

	private void OnEnable() {
		vfx=GetComponent<VisualEffect>();
		vfx.SetFloat("size",Mathf.Sqrt(transform.lossyScale.x*transform.lossyScale.y));
	}
	void Update() {
		vfx.SetFloat("size",Mathf.Sqrt(transform.lossyScale.x*transform.lossyScale.y));
	}
}
